<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

  <head>
    <meta name="copyright" content="&copy; Copyright Simon Johnston 2009. All rights reserved."/>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

	<title>Managing RDF Content</title>

	<script type="text/javascript" src="../advanced/synchWithToc.js"></script>

	<link rel="stylesheet" href="../content/PLUGINS_ROOT/org.eclipse.help.webapp/advanced/breadcrumbs.css" charset="ISO-8859-1" type="text/css"></link>
	<script type="text/javascript" src="../content/PLUGINS_ROOT/org.eclipse.help/livehelp.js"> </script>

	<link rel="stylesheet" href="../content/PLUGINS_ROOT/PRODUCT_PLUGIN/book.css" type="text/css"></link>
	<script type="text/javascript">if( self == top ){ window.location.replace( "../index.jsp?nav=/0_0");}</script>
  </head>

  <body>

    <h2>Managing RDF Content</h2>
	<p>
	  The tool recognizes a number of specific file formats and content types, as 
	  shown in the following table. These contents types fall into two categories,
	  <em>RDF Content</em> and <em>SPARQL Queries</em>. Each of these categories 
	  has associated actions that users can perform on the resources in the 
	  workspace as described later.
	</p>
	<h3>Content Types</h3>
    <p>
      The following table summarizes the supported content types.
    </p>
	<table border="1" width="100%">
	  <tr><th>Content Type</th><th>File Extension(s)</th><th>Eclipse Editor</th><th>Comments</th></tr>
	  <tr><td>SPARQL Query</td><td>.sparql</td><td>text</td><td>A SPARQL query.</td></tr>
	  <tr><td>N-Triples RDF Content</td><td>.nt</td><td>text</td><td>RDF content in N-Triple format.</td></tr>
	  <tr><td>Turtle RDF Content</td><td>.ttl</td><td>text</td><td>RDF content in Turtle format.</td></tr>
	  <tr><td>N3 RDF Content</td><td>.n3</td><td>text</td><td>RDF content in N3 format.</td></tr>
	  <tr><td>RDF/XML RDF Content</td><td>.rdf</td><td>xml</td><td>RDF content in RDF/XML format.</td></tr>
	</table>
	<p>
	  The RDF Content types support <em>import</em> actions so that the contained RDF data
	  can be added to a Jena store; the Query content type(s) support a <em>run</em>
	  action to execute the query against a Jena store.
	</p>
	<h3>New Content Wizards</h3>
	<p>
	  At this time only the RDF/XML content type is supported by the standard
	  Eclipse <code>File->New</code> menu. When you select <code>File->New->Other...</code>
	  you will see the following dialog, notice the open <code>Jena</code>
	  category.
	</p>
	<p>
  	  <img src="images/jt-new.png"/>
  	</p>
  	<p>
  	  When you select the <code>New RDF/XML File</code> option you'll be presented
  	  with the specific dialog shown below. 
  	</p>
  	<p>
	  <img src="images/jt-new-rdf.png"/>
  	</p>
  	<p>
  	  The first two inputs are pretty standard Eclipse fair, the last is specific to
  	  RDF and is used in creating the default content, as shown below.
  	</p>
  	<dl>
      <dt>Container</dt><dd>the workspace container in which the resource will be created.</dd>
	  <dt>File name</dt><dd>the name of the workspace resource to create.</dd>
	  <dt>Subject URI</dt><dd>the URI to be the subject of the graph, can be left blank.</dd>
  	</dl>
  	<p>
  	  When you hit <code>Finish</code> the tool will create a new resource in
  	  your workspace and expand a simple template into the resource to get
  	  you started. Note that the attrbute <code>rdf:about</code> will be set to
  	  the value you specified for <code>Subject URI</code> in the dialog above,
  	  in this case it is the empty string.
  	</p>
  	<pre>
&lt;?xml version="1.0"?&gt;
&lt;rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;
  &lt;rdf:Description rdf:about=""&gt;
  &lt;/rdf:Description&gt;
&lt;/rdf:RDF&gt;
  	</pre>
  </body>
  
</html>